﻿using System;
using System.ComponentModel.DataAnnotations;
using System.Runtime.Serialization;

namespace Matrix.MaKaYunShang.Model.Wechat
{
    [Serializable]
    [DataContract]
    public class WxUserInfo
    {
        /// <summary>
        ///     用户的唯一标识
        /// </summary>
        [DataMember(Name = "openid")]
        [Display(Name = "用户的唯一标识")]
        public string openid { get; set; }

        /// <summary>
        ///     用户昵称
        /// </summary>
        [DataMember(Name = "NickName")]
        [Display(Name = "用户昵称")]
        public string nickname { get; set; }

        /// <summary>
        ///     用户的性别，值为1时是男性，值为2时是女性，值为0时是未知
        /// </summary>
        [DataMember(Name = "sex")]
        [Display(Name = "用户的性别")]
        public string sex { get; set; }

        /// <summary>
        ///     用户个人资料填写的省份
        /// </summary>
        [DataMember(Name = "province")]
        [Display(Name = "用户个人资料填写的省份")]
        public string province { get; set; }

        /// <summary>
        ///     普通用户个人资料填写的城市
        /// </summary>
        [DataMember(Name = "city")]
        [Display(Name = "普通用户个人资料填写的城市")]
        public string city { get; set; }

        /// <summary>
        ///     国家，如中国为CN
        /// </summary>
        [DataMember(Name = "country")]
        [Display(Name = "国家")]
        public string country { get; set; }

        /// <summary>
        ///     用户特权信息, json 数组，如微信沃卡用户为（chinaunicom）
        /// </summary>
        [DataMember(Name = "privilege")]
        [Display(Name = "用户特权信息")]
        public string[] privilege { get; set; }

        /// <summary>
        ///     用户头像，最后一个数值代表正方形头像大小
        ///     （有0、46、64、96、132数值可选，0代表640*640正方形头像），
        ///     用户没有头像时该项为空
        /// </summary>
        [DataMember(Name = "headimgurl")]
        [Display(Name = "用户头像")]
        public string headimgurl { get; set; }

        /// <summary>
        ///     只有在用户将公众号绑定到微信开放平台帐号后，才会出现该字段
        /// </summary>
        [DataMember(Name = "unionid")]
        [Display(Name = "unionid")]
        public string unionid { get; set; }

        /// <summary>
        ///     用户是否订阅该公众号标识，值为0时，代表此用户没有关注该公众号，拉取不到其余信息。
        /// </summary>
        [DataMember(Name = "subscribe")]
        [Display(Name = "用户是否订阅该公众号标识")]
        public int subscribe { get; set; }

        /// <summary>
        ///     用户关注时间，为时间戳。如果用户曾多次关注，则取最后关注时间
        /// </summary>
        [DataMember(Name = "subscribe_time")]
        [Display(Name = "用户关注时间")]
        public int subscribe_time { get; set; }

        /// <summary>
        ///     公众号运营者对粉丝的备注，公众号运营者可在微信公众平台用户管理界面对粉丝添加备注
        /// </summary>
        [DataMember(Name = "remark")]
        [Display(Name = "公众号运营者对粉丝的备注")]
        public string remark { get; set; }

        /// <summary>
        ///     用户所在的分组ID
        /// </summary>
        [DataMember(Name = "groupid")]
        [Display(Name = "用户所在的分组ID")]
        public int groupid { get; set; }

    }
}